<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript">
        if(self != top){
            top.location.href = self.location.href;
        }
    </script>
    <!--bootstrap插件-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="/static/plugin/bootstrap/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="/static/plugin/jo/joUI.css" rel="stylesheet"/>
    <!--字体插件-->
    <link href="/static/plugin/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
   <!-- <link href="/static/plugin/layui-2.4.3/css/layui.css" rel="stylesheet"/>-->
    <!--ztree-->
    <link href="/static/plugin/zTree/css/metroStyle/metroStyle.css" rel="stylesheet"/>
    <!--common-->
    <link href="/static/css/common.css" rel="stylesheet"/>
    <link href="/static/css/login.css" rel="stylesheet">

    <title>登录</title>
</head>
<body class="bg-black">

<div class="container-fluid" style="height: 100%;">
    <div class="row">
        <div class="login-head">
            <img src="/static/images/logo_simple.png" class="login-logo">
        </div>
    </div>
    <div class="row">
        <div class="col-lg-2"></div>
        <div class="col-lg-8">
            <div class="login-content">
                <div class="login-ad">
                    <h2><b>web开发从未如此简单</b></h2>
                    <h5 class="slogan-padding">流畅的前端体验</h5>
                    <h5 class="slogan-padding">高度弹性，应用开发随心所欲</h5>
                    <h5 class="slogan-padding">高可扩展，产品迭代如虎添翼</h5>
                    <h5 class="slogan-padding">组件化平台，开发就像搭积木</h5>
                    <h5 class="slogan-padding">分布式架构设计，高并发环境性能更强劲</h5>
                    <h5 class="slogan-padding">Young，让开发更简单！</h5>
                </div>
                <div id="lg" class="login-bar">
                    <span class="h4"><b>密码登录</b></span>
                    <br/><br/>
                    <h5 style="color: #73777A;">使用平台账号密码进行登录</h5>
                    <br/>
                    <input class="form-control" value="" id="account" name="account" placeholder="用户名" autocomplete="off" type="text">
                    <br/>
                    <input class="form-control" value="" id="password" name="password" placeholder="登录密码" autocomplete="off" type="password">
                    <br/>

                    <div class="input-group">
                        <input class="form-control" value="" id="securityCode" name="securityCode" placeholder="验证码" autocomplete="off" type="text">
                        <span class="input-group-addon" style="padding: 0px 0px 0px 5px;overflow: hidden;border: none;"><img id="img_security_code" src="" title="点击刷新验证码" onclick="refreshSecurityCode()" style="width: 120px;height: 30px;"/></span>
                    </div>
                    <br/>
                    <button type="button" class="btn btn-primary" style="width: 100%;" onclick="loginSubmit()">登录</button>

                    <div class="hint">
                        <label class="pull-left">
                            <input type="checkbox" id="rememberMe" style="vertical-align: text-bottom;"/>
                            <span style="vertical-align: middle;">记住我</span>
                        </label>
                        <a href="#">忘记密码</a>
                        &nbsp;
                        <a class="cursor-hand" onclick="openRegister()">免费注册</a>
                    </div>
                    <h6>其他方式登录：
                        <img class="login-other" title="微博授权登录" src="">
                        &nbsp;&nbsp;<img class="login-other" title="支付宝授权登录" src=""/>
                    </h6>
                </div>

                <div id="rg" class="login-bar" style="display: none;height: 430px;">
                    <form id="registerForm">
                        <span class="h4"><b>用户注册</b></span>
                        <br/>
                        <br/>
                        <input id="name" class="form-control" name="name" placeholder="姓名" type="text" maxlength="32" ErrEmpty="姓名不允许为空" autocomplete="off">
                        <br/>
                        <input type="text" class="form-control" placeholder="账号" name="account" ErrEmpty="账号不允许为空" autocomplete="off">
                        <br/>
                        <input type="password" class="form-control" name="password" placeholder="密码" maxlength="32" ErrEmpty="密码不允许为空" autocomplete="off">
                        <br/>
                        <input type="password" class="form-control" name="password2" placeholder="确认密码" maxlength="32" ErrEmpty="确认密码不允许为空" autocomplete="off">
                        <br/>
                        <div class="input-group">
                            <input class="form-control" value="" name="securityCode" placeholder="验证码" autocomplete="off" type="text">
                            <span class="input-group-addon" style="padding: 0px 0px 0px 5px;overflow: hidden;border: none;"><img id="img_security_code2" src="" title="点击刷新验证码" onclick="refreshSecurityCode()" style="width: 120px;height: 30px;"/></span>
                        </div>
                        <br/>
                        <button type="button" id="rgBtn" class="btn btn-primary" style="width: 100%;" onclick="registerUser()">注册</button>
                    </form>
                    <div class="hint" style="">
                        &nbsp;
                        <a class="cursor-hand" onclick="openLogin()">返回登录</a>
                    </div>
                </div>

            </div>
        </div>
        <div class="col-lg-2"></div>
    </div>
</div>

<!--配置信息-->
<script src="/static/js/config.js"></script>
<!--jquery-->
<script src="/static/plugin/jquery/jquery-3.3.1.js"></script>
<script src="/static/plugin/jquery/jquery.cookie.js"></script>
<!--bootstrap-->
<script src="/static/plugin/bootstrap/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="/static/plugin/other/html5shiv.js"></script>
<script src="/static/plugin/other/respond.min.js"></script>
<![endif]-->
<!--layui-->
<script src="/static/plugin/layui-2.4.3/layui.all.js"></script>
<!--ztree-->
<script src="/static/plugin/zTree/js/jquery.ztree.all.js"></script>
<!--common-->
<script src="/static/js/common.js"></script>
<!--jo-->
<script src="/static/plugin/jo/jo.js"></script>
<script src="/static/plugin/jo/jo-adapt.js"></script>
<script src="/static/plugin/jo/jo-page-view.js"></script>
<script src="/static/plugin/jo/jo-page-form.js"></script>
<script src="/static/plugin/jo/jo-listener.js"></script>
<script src="/static/plugin/jsencrypt/jsencrypt.min.js"></script>
<script src="/static/js/sso.js"></script>
<script type="text/javascript">
    if(loginUser){
        window.location.href = URL_PORTAL + 'portal/';
    }

    //cookie中存储用户名的key
    var COOKIE_ACCOUNT = "account";

    //绑定键盘事件
    document.onkeydown = function(event){
        var e = event || window.event || arguments.callee.caller.arguments[0];
        if(e && e.keyCode==13){//enter
            if(state == 2){
                registerUser();
            }else{
                loginSubmit();
            }

        }
    };

    $(function () {
        if(jo.isValid($.cookie(COOKIE_ACCOUNT))){
            $("#account").val($.cookie(COOKIE_ACCOUNT));//回显账号
            document.getElementById("rememberMe").checked = true;
        }else{
            document.getElementById("rememberMe").checked = false;
        }
        ssoSecured();//安全认证
    });

</script>

</body>
</html>
